/**
 * 
 */
package com.mc.data.clas;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.beans.BeanUtils;

import com.mc.data.clas.copy.Aclass;
import com.mc.data.clas.copy.Bclass;
import com.mc.data.clas.copy.Cclass;
import com.mc.data.clas.copy.Dclass;

/**
 * @author w.weizhen
 *
 */
public class ClassCopy {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
//		List<Aclass> acs = new ArrayList<Aclass>();
//		for (int i = 0; i < 5; i++) 
//		{
//			List<Bclass> bs = new ArrayList<Bclass>();
//			for (int j = 0; j < 3; j++) 
//			{
//				Bclass b = new Bclass(RandomStringUtils.random(15, "abcdefgABCDEFG123456789"), RandomStringUtils.random(15, "abcdefgABCDEFG123456789"));
//				bs.add(b);
//			}
//			Aclass ac = new Aclass(bs, RandomStringUtils.random(15, "abcdefgABCDEFG123456789"), RandomStringUtils.random(15, "abcdefgABCDEFG123456789"));
//			acs.add(ac);
//		}
//		
//		List<Aclass> ccs = new ArrayList<Aclass>();
////		for (int i = 0; i < acs.size(); i++) 
////		{
////			Aclass ac = acs.get(i);
////			Aclass cc = new Aclass();
////			BeanUtils.copyProperties(ac, cc);
////			ccs.add(cc);
////		}
//		BeanUtils.copyProperties(acs, ccs);
//		System.out.println(ccs.toString());
		
		//排序
		List<Dclass> dcs = new ArrayList<Dclass>();
		for (int i = 0; i < 5; i++) 
		{
			Dclass dc = new Dclass(RandomStringUtils.random(2, "0123456789")+"-"+RandomStringUtils.random(2, "0123456789")+"-"+RandomStringUtils.random(2, "0123456789"), "");
			dcs.add(dc);
		}
		System.out.println(dcs.toString());
		dcs.sort((x,y)->x.getBid().compareTo(y.getBid()));
		System.out.println(dcs.toString());
		
		
		
	}

}
